Programming Languages
-
-
For details about syntax and semantics, see "Programming Languages - Overview".
The languages consist of two textual and three graphical versions:
Textual:
- Instruction List (IL "Instruction list" This is a low-level language and resembles assembly)
- Structured Text (ST "Structured text" A high-level language that is block structured and syntactically resembles Pascal)
Graphical
- Sequential Function A function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances. Chart (SFC "Sequential function chart" It can be used to program processes that can be split into steps. The main components of SFC are: - Steps with associated actions - Transitions with associated logic conditions - Directed links between steps and transitions)
- Free Form Ladder Diagram (FFLD)
- Function Block A function block groups an algorithm and a set of private data. It has inputs and outputs. Diagram (FBD "Function block diagram" A function block diagram describes a function between input variables and output variables. A function is described as a set of elementary blocks)
All five languages are interlinked: they provide a common suite. The choice of programming language depends on:
- the programmer's background
- the problem at hand
- the level of describing the problem
- the structure of the control system
- the interface to other people / departments
Sequential Function Chart (SFC)
SFC describes graphically the sequential behavior of a control program. It is derived from Petri Nets.
SFC organizes the internal structure of a program, and helps to deconstruct a control problem into manageable parts, while maintaining the overview.
SFC consists of steps, linked with Action Blocks and Transitions. Each step represents a particular state of the systems being controlled. A transition is associated with a condition, which, when true, causes the step before the transition to be deactivated, and the next step to be activated. Steps are linked to action blocks, performing a specific control action. Each element can be programmed in any of the IEC languages, including SFC itself.
Alternative and Parallel Sequences
You can use alternative sequences and even parallel sequences, like those commonly required in batch applications. For example, one sequence is used for the primary process, and the second for monitoring the overall operating constraints.
As shown in the following picture, parallel sequences are also possible:
Figure 5-1: Example of a Parallel Sequence in SFC
From step 1, it either goes to step 2a or step 2b, depending on which of the transition conditions is met. Both conditions need to exclude each other.
Structured Text (ST)
ST is a very powerful high-level language with its roots in ADA, Pascal and “C”. It contains all the essential elements of a modern programming language, including selection branches (IF-THEN-ELSE and CASE OF) and iteration loops (FOR, WHILE and REPEAT). These elements can also be nested. It can be used for the definition of complex function blocks, which can be used within any of the other languages.
Function Block Diagram (FBD)
FBD is very common to the process industry. It expresses the behavior of functions, function blocks and programs as a set of interconnected graphical blocks, as in electronic circuit diagrams. It looks at a system in terms of the flow of signals between processing elements.
Free Form Ladder Diagram (FFLD)
FFLD is based on the graphical presentation of Relay Ladder Logic.
Instruction List (IL)
IL is the European counterpart of FFLD. As textual language, it looks like Assembler.